<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/3/23 0023
 * Time: 下午 22:41
 */
namespace app\common\model;

use think\Db;
use think\Model;

class Type extends Model
{
    protected $pk = 'id';
    protected $autoWriteTimestamp = 'datetime';

    //自定义初始化
    protected function initialize()
    {
        parent::initialize();
    }

    /**
     * 获取所有分类
     */
    public function getSysAll(){
        $res = $this->field('id,name')->where('user_id=0')->select();
        return $res;
    }
}